import request from '@/utils/request.js'

export const getUserAddressList = (data) => {
  return request({
    url: '/address/list',
    method: 'GET',
    data
  })
}

export const getAddressDetail = (data) => {
  return request({
    url: '/address/detail',
    method: 'GET',
    data
  })
}

export const saveAddress = (data) => {
  return request({
    url: '/address/save',
    method: 'POST',
    data
  })
}

export const deleteAddress = (id) => {
  return request({
    url: '/address/delete?id=' + id,
    method: 'POST',
  })
}